package com.hong.chapter2;

/**
 * Created by hong on 2018/5/27.
 */
public class TicketWindow extends  Thread {
    private final  int MAX= 500;

    private final  String name;


    private static int index = 1;

    public TicketWindow(String name){
        this.name = name;
    }

    @Override
    public void run() {
       while (index<=MAX){
           System.out.println("柜台："+name+"当前的号码是："+(index++));
       }
    }
}

